package org.ibase4j;

import com.alibaba.fastjson.parser.ParserConfig;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.test.context.ContextConfiguration;
import top.ibase4j.core.Constants;
import top.ibase4j.core.util.SecurityUtil;

@SpringBootApplication(scanBasePackages = {"top.ibase4j", "org.ibase4j","cn.donzell"})
public class IBase4JApplication extends SpringBootServletInitializer {
    public static void main(String[] args) {
        ParserConfig.getGlobalInstance().addAccept("org.ibase4j.");

        String encrypt = SecurityUtil.encryptDes("Ldp172733", Constants.DB_KEY.getBytes());
        System.out.println(encrypt);
        System.out.println(SecurityUtil.decryptDes(encrypt, Constants.DB_KEY.getBytes()));

        SpringApplication.run(IBase4JApplication.class, args);
    }
}
